package chpt05;

public class StringTest {

	public static void main(String[] args) {
		Comparable<String> str = "abc";
		CharSequence cs = (CharSequence)str;
		int r = str.compareTo("abc"); // 0，代表相等
		int l = cs.length();          // 3
		CharSequence x = cs.subSequence(0, 2); // ab
		System.out.println(r+" "+l+" "+x);
	}

}
